from multiprocessing import Process
from threading import Thread
import time


def sim_calc():
    a = 0
    while a < 10000000:
        a += 1


if __name__ == "__main__":
    start_time = time.time()
    t_array = []
    for index in range(10):
        # t = Thread(target=sim_calc)
        t = Process(target=sim_calc)
        t.start()
        t_array.append(t)

    [t.join() for t in t_array]
    end_time = time.time()
    print(f"运行时间: {end_time-start_time}")